use strict;
use warnings;
use Data::Dumper;
use Test::More 'no_plan';

use testsupport  ;

use_ok('Log');
use_ok('Model');
use_ok('Subject');
use_ok("SubjectInstruction");

my $log = Log->instance();

$log->setlevels('DEBUG',3);

my $model = Model->new( root => "./data");
$model->read_model();

my $S = Subject->new( model => $model , id => "REQ/TOOL/GEN");

my @modelsections = $S->getModelSections();

# check here...

my $text = $S->getSection("TEXT");
$text = "modificato1";
$S->setSection("TEXT",$text);

$S->assertion_insert_add("THIS","isTest_alone");
$S->assertion_insert_add("THIS","isTest","cicciobello1","cicciobello2","cicciobello3");
$S->assertion_insert_add("THIS","isTest_3","cicciobello1","cicciobello2","cicciobello3");
$S->assertion_insert_add("THIS","toBeCleared","cicciobello1","cicciobello2","cicciobello3");
$S->assertion_delete_add("THIS","isTest","cicciobello2");
$S->assertion_delete_add("THIS","isTest_3");
$S->assertion_subst_add("THIS","isTest","cicciobello1","cicciobello_subst");

$S->assertion_insert_lock("THIS","thisIsLocked");
$S->assertion_insert_lock("THIS","thisIsLocked2");
$S->assertion_delete_lock("THIS","thisIsLocked1");

$S->assertion_insert_clear("THIS","isTest");
$S->assertion_insert_clear("THIS","toBeCleared");
$S->assertion_insert_clear("THIS","toBeCleared_del");
$S->assertion_delete_clear("THIS","toBeCleared_del");

my $instructions = $S->getAssertions("THIS");

my $trace = $log->get_printable_stack();
print STDERR $trace;
$trace = $log->get_printable_filtered_stack();
print STDERR $trace;


